static-lib=libmymath.a

$(static-lib):add.o sub.o
	ar -rc $@ $^
add.o sub.o:add.c sub.c
	gcc -c $^
	
.PHONY:clean
clean:
	rm -rf *.o *.a $(static-mylib) mathlib 

.PHONY:output
output:
	mkdir -p mathlib/include
	mkdir -p mathlib/lib
	cp *.h mathlib/include/
	cp *.a mathlib/lib/
	
